package com.fieldchain.ex.fa100.mvp.presenter;

import android.graphics.Bitmap;
import com.fieldchain.ex.fa100.inter.ImageCallBack;
import com.fieldchain.ex.fa100.inter.IntegerCallBack;
import com.fieldchain.ex.fa100.mvp.base.MyBasePresenter;
import com.fieldchain.ex.fa100.mvp.model.LoginModle;
import com.fieldchain.ex.fa100.mvp.view.LoginView;
/**
 * Created by biyunlong
 * Email: 1225198434@qq.com
 * Data:  2018/9/3
 */
public class LoginPresenter extends MyBasePresenter<LoginModle,LoginView> {
    public void login(String userName,String password,String imageCode){
        model.login(userName,password,imageCode, new IntegerCallBack() {
            @Override
            public void index(int status) {
                view.loginResult(status);
            }
        });
    }
    public void login(String userName,String smsCode){
        model.login(userName,smsCode, new IntegerCallBack() {
            @Override
            public void index(int status) {
                view.loginResult(status);
            }
        });
    }
     public void getVer(){
         model.getVer(new ImageCallBack() {
             @Override
             public void imageReceive(Bitmap bit) {
                 view.verImage(bit);
             }
         });
     }
}
